Skip to content

Add ukify-fix-insertion-of-padding-in-merged-sections patch to systemd#17377

Open
vinceaperri wants to merge 1 commit into
3.0from
user/vinceaperri/backport-systemd-ukify-padding-fix
Open

Add ukify-fix-insertion-of-padding-in-merged-sections patch to systemd#17377
vinceaperri wants to merge 1 commit into
3.0from
user/vinceaperri/backport-systemd-ukify-padding-fix

Conversation

@vinceaperri
Copy link
Copy Markdown
Contributor

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Backports upstream ukify fix (ec1d031f3de02f84beca89e2b402d085fba62be4):
when merging into an existing PE section, padding was derived from the new
section size instead of the existing section size, which can leave
insufficient padding and corrupt the resulting UKI.

Change Log
  • Added SPECS/systemd/ukify-fix-insertion-of-padding-in-merged-sections.patch (upstream patch content).
  • Added Patch0492 entry in SPECS/systemd/systemd.spec.
  • Bumped Release from 27 to 28 and added a changelog entry.
Does this affect the toolchain?

NO

Test Methodology
  • Pipeline build id: xxxx

@vinceaperri vinceaperri requested a review from a team as a code owner May 20, 2026 17:42
@vinceaperri vinceaperri force-pushed the user/vinceaperri/backport-systemd-ukify-padding-fix branch from b1d6c44 to e610142 Compare May 20, 2026 19:38
@vinceaperri vinceaperri requested a review from Copilot May 20, 2026 19:39
@vinceaperri vinceaperri changed the title systemd: backport ukify merged-sections padding fix Add ukify backport patch to systemd May 20, 2026
@vinceaperri vinceaperri changed the title Add ukify backport patch to systemd Add ukify-fix-insertion-of-padding-in-merged-sections patch to systemd May 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR backports an upstream ukify fix into the Azure Linux systemd packaging to prevent creation of corrupted UKI binaries when merging data into an existing PE section.

Changes:

  • Added an upstream backport patch to correct padding calculation when merging PE sections in ukify.
  • Updated systemd.spec to include the new patch, bump Release, and add a changelog entry.
  • Bumped systemd-boot-signed Release to keep it aligned with the systemd package release.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
SPECS/systemd/ukify-fix-insertion-of-padding-in-merged-sections.patch Adds upstream backport fixing padding logic in ukify when merging into an existing PE section.
SPECS/systemd/systemd.spec Registers Patch0492, bumps Release to 28, and records the backport in %changelog.
SPECS-SIGNED/systemd-boot-signed/systemd-boot-signed.spec Bumps Release to 28 to match the systemd spec release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0 PRs Destined for 3.0 Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants